tools/xenstore: fire watches only when removing a specific node
authorJuergen Gross <jgross@suse.com>
Thu, 11 Jun 2020 14:12:43 +0000 (16:12 +0200)
committerHans van Kranenburg <hans@knorrie.org>
Tue, 15 Dec 2020 11:28:46 +0000 (12:28 +0100)
commit8ceee2bf02bdd4496005e814e3319d48c6021491
tree83dcc8a23569438cd77c1da2197e339578c7f24f
parentda58be61f7fc943cbf7fce3de3f36f795a0104dd
tools/xenstore: fire watches only when removing a specific node

Instead of firing all watches for removing a subtree in one go, do so
only when the related node is being removed.

The watches for the top-most node being removed include all watches
including that node, while watches for nodes below that are only fired
if they are matching exactly. This avoids firing any watch more than
once when removing a subtree.

This is part of XSA-115.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Paul Durrant <paul@xen.org>
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_watch.c
tools/xenstore/xenstored_watch.h